perm filename SEGFIX.FAI[RST,LCS] blob
sn#207672 filedate 1976-03-25 generic text, type C, neo UTF8
COMMENT ⊗ VALID 00002 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002 ENTRY SEGFIX↔ TITLE SEGFIX - Make writable segment unique
C00004 ENDMK
C⊗;
ENTRY SEGFIX↔ TITLE SEGFIX - Make writable segment unique
;TVR - Mar 76
;
;FORTRAN Kludge to protection of a [writable ] upper segment
;so that others do not try to use it also. This is due to the
;fact that the system tries to make people share upper segments
;and that the FORTRAN compiler does not generate pure code.
;
; Called from FORTRAN with
; CALL SEGFIX
; which compiles into
; JSR 16,SEGFIX
;
SEGFIX: 0
MOVSI 1,777000 ;Upper segment, Prot=377, Date=now
SETCRD 1, ;Set creation and protection
POINTS FOOTAB ;Check to see if we lost
SKIPN FOOTAB+1 ;Is there more that one job number?
JRA 16,(16) ;Win! Return
OUTSTR[ASCIZ/You lose. Try again. /]
HALT .
ARRAY FOOTAB[4] ;Really should be =63, but if there is more
;Than two entries used, one has probably
;already lost completely anyway!!!
END